import Layout from '@/layout'

const sys = {
  "sys": Layout,
  "sys/user": () => import('@/views/sys/user'),
  "sys/role": () => import('@/views/sys/role'),
  "sys/permission": () => import('@/views/sys/permission'),
  "sys/app": () => import('@/views/sys/app'),
  "sys/company": () => import('@/views/sys/company'),
}

const app = {
  "app": Layout,
  "app/circleNav": () => import('@/views/app/circleNav'),
  "app/swiper": () => import('@/views/app/swiper')
}

const business = {
  "business": Layout,
  "business/brand": () => import('@/views/business/brand'),
  "business/product": () => import('@/views/business/product'),
  "business/productAttribute": () => import('@/views/business/productAttribute'),
  "business/productAttributeCategory": () => import('@/views/business/productAttributeCategory'),
  "business/productCategory": () => import('@/views/business/productCategory'),
}

const oms = {
  "oms": Layout,
  "oms/companyAddress": () => import('@/views/oms/companyAddress'),
  "oms/order": () => import('@/views/oms/order'),
  "oms/orderItem": () => import('@/views/oms/orderItem'),
  "oms/orderReturnApply": () => import('@/views/oms/orderReturnApply'),
  "oms/orderReturnReason": () => import('@/views/oms/orderReturnReason'),
  "oms/orderSetting": () => import('@/views/oms/orderSetting'),
  "oms/userAddress": () => import('@/views/oms/userAddress'),
}

const menus = new Map()

//添加到此----------------------------
const listMap = [ sys, app, business, oms ]


listMap.forEach(map => {
  for (var key in map) {
    menus.set(key, map[key])
  }
})
export default menus
